//
//  KiwipenRecord.h
//  SqliteManagerDemo
//
//  Created by US bike on 2017/9/5.
//  Copyright © 2017年 US bike. All rights reserved.
//

#import <Foundation/Foundation.h>

#define DB_NAME @"database.db"

#define SQL_CREATE_TABLE_RECORD @"CREATE TABLE IF NOT EXISTS Record (\
                                    recordID integer PRIMARY KEY AUTOINCREMENT NOT NULL,\
                                    userID varchar(10) NOT NULL,\
                                    deviceID varchar(10) NOT NULL,\
                                    roleType integer NOT NULL DEFAULT(1),\
                                    originLanguage varchar(10) NOT NULL,\
                                    transformLuanguage varchar(10) NOT NULL,\
                                    originText nvarchar(300) NOT NULL,\
                                    transformText nvarchar(300),\
                                    updateTime varchar(20) NOT NULL\
                                );"

#define SQL_CREATE_TABLE_VIDEORECORD @"CREATE TABLE IF NOT EXISTS VideoRecord (\
                                        recordID integer PRIMARY KEY NOT NULL,\
                                        originVideoPath nvarchar(128),\
                                        transformVideoPath nvarchar(128),\
                                        updateTime varchar(20) NOT NULL\
                                    ) WITHOUT ROWID;"


typedef enum : NSUInteger {
    RoleTypeLeft,
    RoleTypeRight,
} RoleType;

@interface KiwipenRecord : NSObject

@property (nonatomic, copy) NSString *recordID;
@property (nonatomic, copy) NSString *userID;
@property (nonatomic, copy) NSString *deviceID;
@property (nonatomic, assign) NSInteger roleType;
@property (nonatomic, copy) NSString *originLanguage;
@property (nonatomic, copy) NSString *transformLuanguage;
@property (nonatomic, copy) NSString *originText;
@property (nonatomic, copy) NSString *transformText;
@property (nonatomic, copy) NSString *updateTime;

@property (nonatomic, copy) NSString *originVideoPath;
@property (nonatomic, copy) NSString *transformVideoPath;


+ (NSData *) addHeaderSign:(NSData *) fileData;

+ (instancetype) createTestRecord;
@end
